import config from "./utils/config.js";
//app.js
App({
  onLaunch: function (e) {
    // 获取用户信息
    // console.log(e);
    if (wx.getStorageSync('token')) {
      config.apihead.token = wx.getStorageSync('token')
    } else if(e.path!="pages/index/index") {
      wx.reLaunch({
        url: '/pages/index/index',
      })
    }
  },
  globalData: {
    userInfo: null
  },
})